import request from '@/utils/request'

// 查询推送条件信息列表
export function listPushCondition(query) {
  return request({
    url: '/enterprise/messageCenter/pushCondition/list',
    method: 'get',
    params: query
  })
}

// 查询推送条件信息详细
export function getPushCondition(pushConditionId) {
  return request({
    url: '/enterprise/messageCenter/pushCondition/' + pushConditionId,
    method: 'get'
  })
}

// 新增推送条件信息
export function addPushCondition(data) {
  return request({
    url: '/enterprise/messageCenter/pushCondition',
    method: 'post',
    data: data
  })
}

// 修改推送条件信息
export function updatePushCondition(data) {
  return request({
    url: '/enterprise/messageCenter/pushCondition',
    method: 'put',
    data: data
  })
}

// 删除推送条件信息
export function delPushCondition(pushConditionId) {
  return request({
    url: '/enterprise/messageCenter/pushCondition/' + pushConditionId,
    method: 'delete'
  })
}

// 机构分页查询
export function pageDepartment(query) {
  return request({
    url: "/enterprise/department/department/page",
    method: "get",
    params: query,
  });
}

// 企业端查询机构下推送条件信息
export function listPushConditionByDepartment(query) {
  return request({
    url: "/enterprise/messageCenter/pushCondition/info",
    method: "get",
    params: query,
  });
}

